commonlibsse_ng\re\h/
hkContainerAllocators.rs1use crate::re::hkMemoryAllocator::hkMemoryAllocatorVtbl;
2use crate::re::offsets_rtti::RTTI_hkContainerHeapAllocator__Allocator;
3use crate::re::offsets_vtable::VTABLE_hkContainerHeapAllocator__Allocator;
4use crate::rel::id::VariantID;
5
6#[repr(C)]
12pub struct hkContainerHeapAllocator {
13 address: u8,
15}
16const _: () = assert!(core::mem::size_of::<hkContainerHeapAllocator>() == 0x1);
17
18impl hkContainerHeapAllocator {
19 #[commonlibsse_ng_derive_internal::relocate(
21 cast_as = "*mut *mut Allocator",
22 default = "None",
23 deref_once,
24 id(se = 510713, ae = 383828)
25 )]
26 pub fn get_singleton() -> Option<&'static Allocator> {
27 |deref_type: DerefType| unsafe { deref_type.as_ref() }
28 }
29
30 #[commonlibsse_ng_derive_internal::relocate(
32 cast_as = "*mut *mut Allocator",
33 default = "None",
34 deref_once,
35 id(se = 510713, ae = 383828)
36 )]
37 pub fn get_singleton_mut() -> Option<&'static mut Allocator> {
38 |deref_type: DerefType| unsafe { deref_type.as_mut() }
39 }
40}
41
42#[repr(C)]
44pub struct Allocator {
45 pub vtbl: *const AllocatorVtbl,
46}
47const _: () = assert!(core::mem::size_of::<Allocator>() == 0x8);
48
49impl Allocator {
50 pub const RTTI: VariantID = RTTI_hkContainerHeapAllocator__Allocator;
52 pub const VTABLE: [VariantID; 1] = VTABLE_hkContainerHeapAllocator__Allocator;
54}
55
56#[repr(C)]
57pub struct AllocatorVtbl {
58 pub __base: hkMemoryAllocatorVtbl,
59}